package com.pjh.shitang.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pjh.shitang.entitys.Food;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author yueyinghaibao
 * @date 2022/5/6
 */
@Mapper
@Repository
public interface FoodMapper extends BaseMapper<Food> {
    @Select("select max(fid) from db_food")
    Integer searchMaxFid();

    @Select("select * from db_food where fid >= #{id} limit 1")
    Food searchOneByFid(@Param("id") Integer id);
}
